package com.zhu.esyblog.service;

import com.zhu.esyblog.pojo.Article;
import com.baomidou.mybatisplus.extension.service.IService;
import com.zhu.esyblog.pojo.PageBean;
import com.zhu.esyblog.pojo.RespBean;
import com.zhu.esyblog.vo.ArticleParam;

/**
 * <p>
 *  服务类
 * </p>
 *
 * @author stx
 * @since 2022-06-22
 */
public interface IArticleService extends IService<Article> {
    /**
     * 首页文章查询
     * @param pageBean
     * @return
     */
    RespBean listArticle(PageBean pageBean);

    /**
     * 首页最热文章
     * @param limit
     * @return
     */
    RespBean hotArticle(int limit);

    /**
     * 最新文章
     * @param limit
     * @return
     */
    RespBean newArticles(int limit);

    /**
     * 文章归档
     * @return
     */
    RespBean listArchives();

    /**
     * 发布文章
     * @param articleParam
     * @return
     */
    RespBean publish(ArticleParam articleParam);
}
